package com.sgb.kjwl.view.ui.adapter.packers;

import android.content.Context;
import android.view.View;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.databinding.AppItemMemberLeagerCompanyBinding;
import com.sgb.kjwl.databinding.ItemLaborServiceAndEmploymentPublisListBinding;
import com.sgb.kjwl.interfaces.RecyclerClick;
import com.sgb.kjwl.model.entity.packers.LabourServiceAndEmploymentEntity;
import com.sgb.kjwl.model.entity.packers.LeaguerCompanyEntity;
import com.sgb.kjwl.utils.PointUtils;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

/**
*@author younghow
*@date 2021/9/23
*description:成员单位的adapter
*/
@Deprecated
public class LeaguerCompanyAdapter extends BaseRecycleAdapter<LeaguerCompanyEntity> {

    public LeaguerCompanyAdapter(Context context, List<LeaguerCompanyEntity> data) {
        super(context, R.layout.app_item_member_leager_company, data);
    }

    @Override
    public void convert(ItemViewHolder holder, final LeaguerCompanyEntity entity) {
        AppItemMemberLeagerCompanyBinding binding = (AppItemMemberLeagerCompanyBinding) holder.getmBinding();
        binding.imgBack.setText(entity.getCompanyName().length() > 6 ? String.format("%s...",entity.getCompanyName().substring(0,6)) : entity.getCompanyName());
    }
}